<?xml version="1.0" encoding="utf-8"?>

<!--
Sample license text.
-->

<schema xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:tns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns="http://www.w3.org/2001/XMLSchema">
  <import schemaLocation="http://www.w3.org/2001/xml.xsd" namespace="http://www.w3.org/XML/1998/namespace" />
  <annotation>
    <documentation xml:lang="en">The schema for OASIS ebXML Registry Information Model</documentation>
  </annotation>
  <simpleType name="referenceURI">
    <annotation>
      <documentation xml:lang="en">
        referenceURI is used by reference attributes within RIM.
        Each attribute of type referenceURI references a RegistryObject with
        specified URI as id.
      </documentation>
    </annotation>
    <restriction base="anyURI" />
  </simpleType>
  <simpleType name="String4">
    <restriction base="string">
      <maxLength value="4" />
    </restriction>
  </simpleType>
  <simpleType name="String8">
    <restriction base="string">
      <maxLength value="8" />
    </restriction>
  </simpleType>
  <simpleType name="String16">
    <restriction base="string">
      <maxLength value="16" />
    </restriction>
  </simpleType>
  <simpleType name="String32">
    <restriction base="string">
      <maxLength value="32" />
    </restriction>
  </simpleType>
  <simpleType name="ShortName">
    <restriction base="string">
      <maxLength value="64" />
    </restriction>
  </simpleType>
  <simpleType name="LongName">
    <restriction base="string">
      <maxLength value="256" />
    </restriction>
  </simpleType>
  <simpleType name="FreeFormText">
    <restriction base="string">
      <maxLength value="1024" />
    </restriction>
  </simpleType>
  <complexType name="InternationalStringType">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element ref="tns:LocalizedString" />
    </sequence>
  </complexType>
  <element name="InternationalString" type="tns:InternationalStringType" />
  <element name="Name" type="tns:InternationalStringType" />
  <element name="Description" type="tns:InternationalStringType" />
  <complexType name="LocalizedStringType">
    <attribute default="en-US" ref="xml:lang" />
    <attribute default="UTF-8" name="charset" />
    <attribute name="value" type="tns:FreeFormText" use="required" />
  </complexType>
  <element name="LocalizedString" type="tns:LocalizedStringType" />
  <complexType name="SlotType1">
    <sequence>
      <element minOccurs="1" maxOccurs="1" ref="tns:ValueList" />
    </sequence>
    <attribute name="name" type="tns:LongName" use="required" />
    <attribute name="slotType" type="tns:referenceURI" use="optional" />
  </complexType>
  <element name="Slot" type="tns:SlotType1" />
  <complexType name="ValueListType">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element ref="tns:Value" />
    </sequence>
  </complexType>
  <element name="ValueList" type="tns:ValueListType" />
  <element name="Value" type="tns:LongName" />
  <complexType name="SlotListType">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" ref="tns:Slot" />
    </sequence>
  </complexType>
  <element name="SlotList" type="tns:SlotListType" />
  <complexType name="IdentifiableType">
    <annotation>
      <documentation xml:lang="en">
        Common base type for all types that have unique identity.     
        If id is provided and is not in proper URN syntax then it is used for
        linkage within document and is ignored by the registry. In this case the
        registry generates a UUID URN for id attribute.
        id must not be null when object is retrieved from the registry.
      </documentation>
    </annotation>
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" ref="tns:Slot" />
    </sequence>
    <attribute name="id" type="anyURI" use="required" />
    <attribute name="home" type="anyURI" use="optional" />
  </complexType>
  <element name="Identifiable" type="tns:IdentifiableType" />
  <complexType name="ObjectRefType">
    <annotation>
      <documentation xml:lang="en">
        Use to reference an Object by its id.
        Specifies the id attribute of the object as its id attribute.
        id attribute in ObjectAttributes is exactly the same syntax and semantics as
        id attribute in RegistryObject.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:IdentifiableType">
        <attribute default="false" name="createReplica" type="boolean" />
      </extension>
    </complexContent>
  </complexType>
  <complexType name="ObjectRefListType">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <element ref="tns:ObjectRef" />
    </sequence>
  </complexType>
  <element name="ObjectRefList" type="tns:ObjectRefListType" />
  <element name="ObjectRef" substitutionGroup="tns:Identifiable" type="tns:ObjectRefType" />
  <complexType name="RegistryObjectType">
    <complexContent mixed="false">
      <extension base="tns:IdentifiableType">
        <sequence minOccurs="0" maxOccurs="1">
          <element minOccurs="0" maxOccurs="1" ref="tns:Name" />
          <element minOccurs="0" maxOccurs="1" ref="tns:Description" />
          <element minOccurs="0" maxOccurs="1" name="VersionInfo" type="tns:VersionInfoType" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:Classification" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:ExternalIdentifier" />
        </sequence>
        <attribute name="lid" type="anyURI" use="optional" />
        <attribute name="objectType" type="tns:referenceURI" use="optional" />
        <attribute name="status" type="tns:referenceURI" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="RegistryObject" substitutionGroup="tns:Identifiable" type="tns:RegistryObjectType" />
  <complexType name="RegistryObjectListType">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" ref="tns:Identifiable" />
    </sequence>
  </complexType>
  <element name="RegistryObjectList" type="tns:RegistryObjectListType" />
  <complexType name="AssociationType1">
    <annotation>
      <documentation xml:lang="en">
        Association is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
        An Association specifies references to two previously submitted
        registry entrys.
        The sourceObject is id of the sourceObject in association
        The targetObject is id of the targetObject in association
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute name="associationType" type="tns:referenceURI" use="required" />
        <attribute name="sourceObject" type="tns:referenceURI" use="required" />
        <attribute name="targetObject" type="tns:referenceURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Association" substitutionGroup="tns:Identifiable" type="tns:AssociationType1" />
  <complexType name="AuditableEventType">
    <annotation>
      <documentation xml:lang="en">An Event that forms an audit trail in ebXML Registry.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="1" maxOccurs="1" name="affectedObjects" type="tns:ObjectRefListType" />
        </sequence>
        <attribute name="eventType" type="tns:referenceURI" use="required" />
        <attribute name="timestamp" type="dateTime" use="required" />
        <attribute name="user" type="tns:referenceURI" use="required" />
        <attribute name="requestId" type="tns:referenceURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="AuditableEvent" substitutionGroup="tns:Identifiable" type="tns:AuditableEventType" />
  <complexType name="ClassificationType">
    <annotation>
      <documentation xml:lang="en">
        Classification is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
        A Classification specifies references to two registry entrys.
        The classifiedObject is id of the Object being classified.
        The classificationNode is id of the ClassificationNode classying the object
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute name="classificationScheme" type="tns:referenceURI" use="optional" />
        <attribute name="classifiedObject" type="tns:referenceURI" use="required" />
        <attribute name="classificationNode" type="tns:referenceURI" use="optional" />
        <attribute name="nodeRepresentation" type="tns:LongName" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Classification" substitutionGroup="tns:Identifiable" type="tns:ClassificationType" />
  <complexType name="ClassificationNodeType">
    <annotation>
      <documentation xml:lang="en">
        ClassificationNode is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
        ClassificationNode is used to submit a Classification tree to the Registry.
        The parent attribute is the id to the parent node. code is an optional code value for a ClassificationNode
        often defined by an external taxonomy (e.g. NAICS)
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:ClassificationNode" />
        </sequence>
        <attribute name="parent" type="tns:referenceURI" use="optional" />
        <attribute name="code" type="tns:LongName" use="optional" />
        <attribute name="path" type="string" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ClassificationNode" substitutionGroup="tns:Identifiable" type="tns:ClassificationNodeType" />
  <complexType name="ClassificationSchemeType">
    <annotation>
      <documentation xml:lang="en">
        ClassificationScheme is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:ClassificationNode" />
        </sequence>
        <attribute name="isInternal" type="boolean" use="required" />
        <attribute name="nodeType" type="tns:referenceURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ClassificationScheme" substitutionGroup="tns:Identifiable" type="tns:ClassificationSchemeType" />
  <complexType name="ExternalIdentifierType">
    <annotation>
      <documentation xml:lang="en">
        ExternalIdentifier is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute name="registryObject" type="tns:referenceURI" use="required" />
        <attribute name="identificationScheme" type="tns:referenceURI" use="required" />
        <attribute name="value" type="tns:LongName" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ExternalIdentifier" substitutionGroup="tns:Identifiable" type="tns:ExternalIdentifierType" />
  <complexType name="ExternalLinkType">
    <annotation>
      <documentation xml:lang="en">
        ExternalLink is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute name="externalURI" type="anyURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ExternalLink" substitutionGroup="tns:Identifiable" type="tns:ExternalLinkType" />
  <complexType name="ExtrinsicObjectType">
    <annotation>
      <documentation xml:lang="en">
        ExtrinsicObject is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="1" name="ContentVersionInfo" type="tns:VersionInfoType" />
        </sequence>
        <attribute default="application/octet-stream" name="mimeType" type="tns:LongName" />
        <attribute default="false" name="isOpaque" type="boolean" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ExtrinsicObject" substitutionGroup="tns:Identifiable" type="tns:ExtrinsicObjectType" />
  <element name="Address" type="tns:PostalAddressType" />
  <complexType name="OrganizationType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:Address" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:TelephoneNumber" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:EmailAddress" />
        </sequence>
        <attribute name="parent" type="tns:referenceURI" />
        <attribute name="primaryContact" type="tns:referenceURI" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Organization" substitutionGroup="tns:Identifiable" type="tns:OrganizationType" />
  <complexType name="PersonNameType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <attribute name="firstName" type="tns:ShortName" use="optional" />
    <attribute name="middleName" type="tns:ShortName" use="optional" />
    <attribute name="lastName" type="tns:ShortName" use="optional" />
  </complexType>
  <element name="PersonName" type="tns:PersonNameType" />
  <complexType name="EmailAddressType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <attribute name="address" type="tns:ShortName" use="required" />
    <attribute name="type" type="tns:String32" use="optional" />
  </complexType>
  <element name="EmailAddress" type="tns:EmailAddressType" />
  <complexType name="PostalAddressType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <attribute name="city" type="tns:ShortName" use="optional" />
    <attribute name="country" type="tns:ShortName" use="optional" />
    <attribute name="postalCode" type="tns:ShortName" use="optional" />
    <attribute name="stateOrProvince" type="tns:ShortName" use="optional" />
    <attribute name="street" type="tns:ShortName" use="optional" />
    <attribute name="streetNumber" type="tns:String32" use="optional" />
  </complexType>
  <element name="PostalAddress" type="tns:PostalAddressType" />
  <complexType name="VersionInfoType">
    <attribute default="1.1" name="versionName" type="tns:String16" use="optional" />
    <attribute name="comment" type="string" use="optional" />
  </complexType>
  <complexType name="RegistryPackageType">
    <annotation>
      <documentation xml:lang="en">
        RegistryPackage is the mapping of the same named interface in ebRIM.
        It extends RegistryObject.
        A RegistryPackage is a named collection of objects.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="1" ref="tns:RegistryObjectList" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <element name="RegistryPackage" substitutionGroup="tns:Identifiable" type="tns:RegistryPackageType" />
  <complexType name="ServiceType">
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:ServiceBinding" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <element name="Service" substitutionGroup="tns:Identifiable" type="tns:ServiceType" />
  <complexType name="ServiceBindingType">
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:SpecificationLink" />
        </sequence>
        <attribute name="service" type="tns:referenceURI" use="required" />
        <attribute name="accessURI" type="anyURI" use="optional" />
        <attribute name="targetBinding" type="tns:referenceURI" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="ServiceBinding" substitutionGroup="tns:Identifiable" type="tns:ServiceBindingType" />
  <complexType name="SpecificationLinkType">
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="1" ref="tns:UsageDescription" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:UsageParameter" />
        </sequence>
        <attribute name="serviceBinding" type="tns:referenceURI" use="required" />
        <attribute name="specificationObject" type="tns:referenceURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="SpecificationLink" substitutionGroup="tns:Identifiable" type="tns:SpecificationLinkType" />
  <element name="UsageDescription" type="tns:InternationalStringType" />
  <element name="UsageParameter" type="tns:FreeFormText" />
  <complexType name="TelephoneNumberType">
    <annotation>
      <documentation xml:lang="en">TelephoneNumber is the mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <attribute name="areaCode" type="tns:String8" use="optional" />
    <attribute name="countryCode" type="tns:String8" use="optional" />
    <attribute name="extension" type="tns:String8" use="optional" />
    <attribute name="number" type="tns:String16" use="optional" />
    <attribute name="phoneType" type="tns:String32" use="optional" />
  </complexType>
  <element name="TelephoneNumber" type="tns:TelephoneNumberType" />
  <complexType name="TelephoneNumberListType">
    <sequence>
      <element minOccurs="0" maxOccurs="unbounded" ref="tns:TelephoneNumber" />
    </sequence>
  </complexType>
  <complexType name="PersonType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence minOccurs="1" maxOccurs="1">
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:Address" />
          <element minOccurs="0" maxOccurs="1" ref="tns:PersonName" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:TelephoneNumber" />
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:EmailAddress" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <element name="Person" substitutionGroup="tns:Identifiable" type="tns:PersonType" />
  <complexType name="UserType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:PersonType" />
    </complexContent>
  </complexType>
  <element name="User" substitutionGroup="tns:Identifiable" type="tns:UserType" />
  <complexType name="RegistryType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute name="operator" type="tns:referenceURI" use="required" />
        <attribute name="specificationVersion" type="string" use="required" />
        <attribute default="P1D" name="replicationSyncLatency" type="duration" use="optional" />
        <attribute default="P1D" name="catalogingLatency" type="duration" use="optional" />
        <attribute default="registryLite" name="conformanceProfile" use="optional">
          <simpleType>
            <restriction base="NCName">
              <enumeration value="registryFull" />
              <enumeration value="registryLite" />
            </restriction>
          </simpleType>
        </attribute>
      </extension>
    </complexContent>
  </complexType>
  <element name="Registry" substitutionGroup="tns:Identifiable" type="tns:RegistryType" />
  <complexType name="FederationType">
    <annotation>
      <documentation xml:lang="en">Mapping of the same named interface in ebRIM.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <attribute default="P1D" name="replicationSyncLatency" type="duration" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Federation" substitutionGroup="tns:Identifiable" type="tns:FederationType" />
  <complexType name="AdhocQueryType">
    <annotation>
      <documentation xml:lang="en">
      A registry query.
      A QueryExpression child element is not required when invoking a stored query.
      </documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="1" ref="tns:QueryExpression" />
        </sequence>
      </extension>
    </complexContent>
  </complexType>
  <element name="AdhocQuery" substitutionGroup="tns:RegistryObject" type="tns:AdhocQueryType" />
  <complexType name="QueryExpressionType" mixed="true">
    <sequence>
      <any minOccurs="0" maxOccurs="1" namespace="##other" processContents="lax" />
    </sequence>
    <attribute name="queryLanguage" type="tns:referenceURI" use="required" />
  </complexType>
  <element name="QueryExpression" type="tns:QueryExpressionType" />
  <complexType name="NotificationType">
    <annotation>
      <documentation>Notification of registry events.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="1" maxOccurs="1" ref="tns:RegistryObjectList" />
        </sequence>
        <attribute name="subscription" type="tns:referenceURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Notification" type="tns:NotificationType" />
  <element name="Action" type="tns:ActionType" />
  <complexType name="SubscriptionType">
    <annotation>
      <documentation xml:lang="en">A Subscription for specified Events in an ebXML V3+ registry.</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:RegistryObjectType">
        <sequence>
          <element minOccurs="0" maxOccurs="unbounded" ref="tns:Action" />
        </sequence>
        <attribute name="selector" type="tns:referenceURI" use="required" />
        <attribute name="startTime" type="dateTime" use="optional" />
        <attribute name="endTime" type="dateTime" use="optional" />
        <attribute default="P1D" name="notificationInterval" type="duration" use="optional" />
      </extension>
    </complexContent>
  </complexType>
  <element name="Subscription" substitutionGroup="tns:Identifiable" type="tns:SubscriptionType" />
  <complexType name="ActionType" abstract="true">
    <annotation>
      <documentation>Abstract Base type for all types of Actions.</documentation>
    </annotation>
  </complexType>
  <complexType name="NotifyActionType">
    <annotation>
      <documentation xml:lang="en">Abstract Base type for all types of Notify Actions</documentation>
    </annotation>
    <complexContent mixed="false">
      <extension base="tns:ActionType">
        <attribute default="urn:oasis:names:tc:ebxml-regrep:NotificationOptionType:ObjectRefs" name="notificationOption" type="tns:referenceURI" />
        <attribute name="endPoint" type="anyURI" use="required" />
      </extension>
    </complexContent>
  </complexType>
  <element name="NotifyAction" substitutionGroup="tns:Action" type="tns:NotifyActionType" />
</schema>